package cn.stronglink.assetmanage.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;

import java.util.List;

import cn.stronglink.assetmanage.widget.treeview.TreeNodeId;
import cn.stronglink.assetmanage.widget.treeview.TreeNodeLabel;
import cn.stronglink.assetmanage.widget.treeview.TreeNodePid;

/**
 * Created by Tgb on 2018/6/13.
 * 部门
 */
@Entity
public class Department {
    @Id
    private Long dept_id;           //主键id

    @TreeNodeId(type = String.class)
    @Property
    private String id_;

    @Property
    private String sort;//parentId
    @TreeNodeLabel
    @Property
    private String name;

    @TreeNodePid(type = String.class)
    @Property
    private String pid_;
    @Transient
    private List<Department> departmentList;

    public List<Department> getDepartmentList() {
        return departmentList;
    }

    public void setDepartmentList(List<Department> departmentList) {
        this.departmentList = departmentList;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId_() {
        return this.id_;
    }

    public void setId_(String id_) {
        this.id_ = id_;
    }

    public Long getDept_id() {
        return this.dept_id;
    }

    public void setDept_id(Long dept_id) {
        this.dept_id = dept_id;
    }

    public String getPid_() {
        return this.pid_;
    }

    public void setPid_(String pid_) {
        this.pid_ = pid_;
    }

    public String getSort() {
        return this.sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }


    @Generated(hash = 830948942)
    public Department(Long dept_id, String id_, String sort, String name,
            String pid_) {
        this.dept_id = dept_id;
        this.id_ = id_;
        this.sort = sort;
        this.name = name;
        this.pid_ = pid_;
    }

    @Generated(hash = 355406289)
    public Department() {
    }

    @Override
    public String toString() {
        return name;
    }
}
